

<?php

/* ------------------------------------------------------------
 * Page:Personal Details
 * Author: Gustavo Lozano & Fredrik Kronander
 * Description: Allow user to submit personal details for the booking.
 * 
 **------------------------------------------------------------*/

	
	

?>

<script Language="Javascript">

//Call the jQuery validation function for the form named "Form".  
	$(document).ready(function(){
	    $("#Form").validate();
	  });
	
	
	
	var compulsory= new Array("givenName","familyName","address1","suburb","country","email");
	
//Checks if the chosed country is australia and in that case makes postcode and state required information.

	function australia_check(Form)
	{
		if(document.getElementById("country").value=="Australia")
		{
			$("#state").rules("add", "required");
			$("#postcode").rules("add", "required");	
			$("#aus_show1").show();
			$("#aus_show2").show();
			return;
		}
		else
		{
			$("#state").rules("remove", "required");
			$("#postcode").rules("remove", "required");
			$("#aus_show1").hide();
			$("#aus_show2").hide();
	
			return;
		}
	}
</script>

<form action="index.php" onsubmit="return Form_Validator(this)" name="Form" id="Form">
<table width="100%" border="0" cellspacing="2" cellpadding="2">
		<tr>
			<td colspan=2>
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr height="23px">
						<td>&nbsp;<strong>Complete Booking - stage 1 of 4 - Personal Details<br/><br/>Please provide us your Personal Information</strong></td>
					</tr>
					<tr height="20" valign="bottom">
						<td><span class="style1">Your Personal information is taken securely using 128-bit encryption.</span></td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td colspan=2 height="10"></td>
		</tr>

	<tr>
		<td width="30%" align="right">
			Given Name:<span style="color: red;">*</span>
		</td>
		<td>
			<input type="text" class="required" name="givenName" id="givenName" />
		</td>
	</tr>
	
	<tr>
		<td align="right">
			Family Name: <span style="color: red;">*</span> 
		</td>
		<td>
			<input type="text" class="required" name="familyName" id="familyName"/>
		</td>
	</tr>
	
	<tr>
		<td align="right">
			Address Line 1: <span style="color: red;">*</span>
		</td>
		<td>
			<input type="text" class="required" name="address1" id="address1" />
		</td>
	</tr>
	
	<tr>
		<td align="right">
			Address Line 2: 
		</td>
		<td>
			<input type="text" name="address2" id="address2" />
		</td>
	</tr>
	
	<tr>
		<td align="right">
			Suburb:<span style="color: red;">*</span> 
		</td>
		<td>
			<input type="text" class="required" name="suburb" id="suburb"  />
		</td>
	</tr>
	
	
	<tr>
		<td align="right">
			State: <span id="aus_show1" style="color: red; display:none;">*</span>
		</td>
		<td>
			<input type="text" name="state" id="state" />
		</td>
		<td align="left">
			<div id="aus_show1" style="color: red; display:none;">*</div>
		</td>
	</tr>
	
	<tr>
		<td align="right">
			Postcode:<span id="aus_show2" style="color: red; display:none;">*</span>
		</td>
		<td>
			<input type="text" name="postcode" id="postcode" />
		</td>
	</tr>
	
	<tr>
		<td align="right">
			Country:<span style="color: red;">*</span> 
		</td>
		<td>
			<?php include 'other/allCountry.php';?></td><td align="left">
		</td>
	</tr>
	
	<tr>
		<td align="right">
			Email:<span style="color: red;">*</span> </td><td><input type="text" class="required email" name="email" id="email"/> 
		</td>
	</tr>
	
	<tr>
		<td align="right">
			Mobile Phone:
		</td>
		<td>
			<input type="text" name="mobilePhone" id="mobilePhone" /> 
		</td>
	</tr>
	
	<tr>
		<td align="right">
			Business Phone:
		</td>
		<td>
			<input type="text" name="businessPhone" id="businessPhone"/>
		</td>
	</tr> 
	
	<tr>
		<td align="right">
			Work Phone: 
		</td>
		<td>
			<input type="text" name="workPhone" id="workPhone" />
		</td>
	</tr>
	
	<tr>
		<td align="right">
			<input type="submit" value="Stage 2 - Payment Details"/>
		</td>
	</tr>
</table>

	<input type="hidden" name="content" value="PaymentForm"/> 
</form>